﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DKT.WeiXinAPI.Factory
{
    public abstract class AbstractMessage
    {

        public class MessageBody
        {
            public MessageBody()
            {

                System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1));
                CreateTime = ((int)(DateTime.Now - startTime).TotalSeconds).ToString();
            }

            /// <summary>
            /// 收件人
            /// </summary>
            public string ToUserName { get; set; }
            /// <summary>
            /// 发送人
            /// </summary>
            public string FromUserName { get; set; }

            /// <summary>
            /// 创建时间
            /// </summary>
            public string CreateTime { get; set; }

            /// <summary>
            /// 消息类型
            /// </summary>
            public string MsgType { get; set; }
        }

        public WeiXinAPI.Factory.WeiXinApiContext Context { get; set; }

        public abstract WeiXinAPI.Factory.AbstractMessage.MessageBody Reply();
    }
}
